home *** CD-ROM | disk | FTP | other *** search
/ MacHome 2001 June / MacHome Magazine Demo Disc June 2001.iso / Stuff / Software / Graphic / iView PhotoMover 2.0.3 / AppleScript samples / album test next >
Encoding:
Text File  |  2001-04-10  |  1.6 KB  |  64 lines  |  [TEXT/ToyS]

  1. tell application "iView PhotoMover"
  2.     
  3.     -- Save current settings
  4.     set klog to get the Log
  5.     set ksound to get the Sound
  6.     set kdetails to get the Details
  7.     set khost to get the Host
  8.     
  9.     --set the Details to true -- Set Details to true for tracking down problems.
  10.     set the Details to false
  11.     
  12.     (* function samples *)
  13.     
  14.     -- Get a file to upload...
  15.     set afile to choose file
  16.     activate
  17.     
  18.         -- Host ID's.
  19.         -- 0 = PhotoPoint 
  20.         -- 1 = ClubPhoto -- supports Picture Description and Album Selection
  21.         -- 2 = zing
  22.         -- 3 = ImageStation
  23.         -- 4 = NikonNet
  24.         -- 5 = FotoTime  -- supports Picture Description and Album Selection
  25.         
  26.     set the Log to true -- save  result to log file...
  27.     
  28.     repeat with hostid from 1 to 1
  29.         set the Host to hostid
  30.         try
  31.             
  32.             --  set timeout to some large number
  33.             with timeout of 3600 seconds -- how long to upload? 1 hour?
  34.                 
  35.                 -- upload the image to the currently set site.
  36.                 
  37.                 -- upload an image to default album.
  38.                 open afile
  39.                 
  40.                 -- open afile to album "iview" and caption "test image description".
  41.                 open afile into album "iview" with description "test image description"
  42.                 
  43.                 -- Use currently selected album and upload with a caption.
  44.                 -- open afile with description "test image description"
  45.                 
  46.                 -- Note: Currently FotoTime and ClubPhoto site have support for descriptions. 
  47.                 -- This will be added as other site vendors help us add this feature.
  48.             end timeout
  49.             
  50.         on error msg
  51.             display dialog msg & return & "Uploading to host index " & hostid
  52.         end try
  53.     end repeat
  54.     
  55.     -- restore the settings
  56.     set the Log to klog
  57.     set the Sound to ksound
  58.     set the Details to kdetails
  59.     set the Host to khost
  60.     
  61.     -- quit
  62.     
  63. end tell
  64.